<template>
  <div>
    <!-- <div class="bg-white grid-content">
      <el-form :inline="true" :model="ydscsjtjbForm" class="demo-form-inline">
        <el-form-item label="选择月份:">
          <el-date-picker
            v-model="searchDate"
            type="month"
            align="right"
            unlink-panels
            range-separator="至"
            value-format="yyyy-MM"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="formSearch()">查询</el-button>
          <el-button type="success" @click="download()">下载</el-button>
        </el-form-item>
      </el-form>
    </div> -->
    <div class="bg-white grid-content">
      <div style="overflow: hidden">
        <div class="mytitle">月度生产数据统计表</div>
      </div>
      <!-- 表格 -->
      <el-table
        :data="tableData"
        :header-cell-style="{ background: '#F5F7FA', color: '#909399' }"
        border
        stripe
      >
        <el-table-column prop="rq" label="日期" width="80" align="center">
        </el-table-column>
        <el-table-column prop="gs" label="公司" align="center">
          <el-table-column prop="gs_cs" label="产油" align="center">
            <el-table-column prop="gsCsJkcy" label="井口产油" align="center">
            </el-table-column>
            <el-table-column prop="gsCsMdwj" label="末端微机" align="center">
            </el-table-column>
            <el-table-column prop="gsCsJhcy" label="计划产油" align="center">
            </el-table-column>
            <el-table-column prop="gsCsHscy" label="核实产油" align="center">
            </el-table-column>
            <el-table-column prop="gsCsGsws" label="公司外输" align="center">
            </el-table-column>
            <el-table-column prop="gsCsElws" label="二联外输" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="gsLy" label="拉油" align="center">
            <el-table-column prop="gsLyLy" label="拉油" align="center">
            </el-table-column>
            <el-table-column prop="gsLyTl" label="提捞" align="center">
            </el-table-column>
            <el-table-column prop="gsLyLdy" label="落地油" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="gsKc" label="库存" align="center">
            <el-table-column prop="gsKcGskc" label="公司库存" align="center">
            </el-table-column>
            <el-table-column prop="gsKcElcz" label="二联差值" align="center">
            </el-table-column>
            <el-table-column prop="gsKcElkc" label="二联库存" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="gsZs" label="注水" align="center">
            <el-table-column prop="gsZsJhzs" label="计划水量" align="center">
            </el-table-column>
            <el-table-column prop="gsZsSjsl" label="实际水量" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="gs_jy" label="积压" align="center">
            <el-table-column prop="gsJyZy" label="作业" align="center">
            </el-table-column>
            <el-table-column prop="gsJyDzy" label="待作业" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="gsCy" label="测压" align="center">
            <el-table-column prop="gsCyYj" label="油井" align="center">
            </el-table-column>
            <el-table-column prop="gsCySj" label="水井" align="center">
            </el-table-column>
          </el-table-column>
        </el-table-column>
        <el-table-column prop="dyzyq" label="第一作业区" align="center">
          <el-table-column prop="dyzyqZyq" label="作业区" align="center">
            <el-table-column
              prop="diyi.planOilPro"
              label="计划产油"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="diyi.realOilPro"
              label="实际产油"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="diyi.planWaterInj"
              label="计划注水"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="diyi.realWaterInj"
              label="日注水量"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="diyi.workBacklog"
              label="作业积压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="diyi.workBacklogPending"
              label="待作业积压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="diyi.oilWellPressure"
              label="油井测压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="diyi.waterWellPressure"
              label="水井测压"
              align="center"
            >
            </el-table-column>
            <el-table-column prop="diyi.inventory" label="库存" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dyzyqS322Wj " label="树322" align="center">
            <el-table-column
              prop="dyzyqS322Wj"
              label="微机"
              width="40"
              align="center"
            >
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dyzyqD12" label="东12" align="center">
            <el-table-column prop="dyzyqD12Wj" label="微机" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dyzyqS12" label="尚12" align="center">
            <el-table-column prop="dyzyqS12Wj" label="微机" align="center">
            </el-table-column>
          </el-table-column>
        </el-table-column>
        <el-table-column prop="dezyq" label="第二作业区" align="center">
          <el-table-column prop="dezyqZyq" label="作业区" align="center">
            <el-table-column
              prop="dier.planOilPro"
              label="计划产油"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="dier.realOilPro"
              label="实际产油"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="dier.planWaterInj"
              label="计划注水"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="dier.realWaterInj"
              label="日注水量"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="dier.workBacklog"
              label="作业积压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="dier.workBacklogPending"
              label="待作业积压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="dier.oilWellPressure"
              label="油井测压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="dier.waterWellPressure"
              label="水井测压"
              align="center"
            >
            </el-table-column>
            <el-table-column prop="dier.inventory" label="库存" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dezyqD16" label="东16" align="center">
            <el-table-column prop="dezyqD16Wj" label="微机" align="center">
            </el-table-column>
            <el-table-column
              prop="dezyqD16Wscl"
              label="污水处理"
              align="center"
            >
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dezyqD14" label="东14" align="center">
            <el-table-column
              prop="dezyqD14382wj"
              label="382微机"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="deyzyqD14D14wj"
              label="东14微机"
              align="center"
            >
            </el-table-column>
          </el-table-column>
        </el-table-column>
        <el-table-column prop="dszyq" label="第三作业区" align="center">
          <el-table-column prop="dszyqZyq" label="作业区" align="center">
            <el-table-column
              prop="disan.planOilPro"
              label="计划产油"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disan.realOilPro"
              label="实际产油"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disan.planWaterInj"
              label="计划注水"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disan.realWaterInj"
              label="日注水量"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disan.workBacklog"
              label="作业积压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disan.workBacklogPending"
              label="待作业积压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disan.oilWellPressure"
              label="油井测压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disan.waterWellPressure"
              label="水井测压"
              align="center"
            >
            </el-table-column>
            <el-table-column prop="disan.inventory" label="库存" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dszyqS2" label="树2" align="center">
            <el-table-column prop="dszyqS2Cyl" label="产油量" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dszyq101d" label="101队" align="center">
            <el-table-column prop="dszyq101dCyl" label="产油量" align="center">
            </el-table-column>
            <el-table-column
              prop="dszyq101dZrl"
              label="c02注入量"
              align="center"
            >
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dszyqS16" label="树16" align="center">
            <el-table-column prop="dszyqS16Wj" label="微机" align="center">
            </el-table-column>
          </el-table-column>
        </el-table-column>
        <el-table-column prop="dsizyq" label="第四作业区" align="center">
          <el-table-column prop="dsizyqZyq" label="作业区" align="center">
            <el-table-column
              prop="disi.planOilPro"
              label="计划产油"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disi.realOilPro"
              label="实际产油"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disi.planWaterInj"
              label="计划注水"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disi.realWaterInj"
              label="日注水量"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disi.workBacklog"
              label="作业积压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disi.workBacklogPending"
              label="待作业积压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disi.oilWellPressure"
              label="油井测压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="disi.waterWellPressure"
              label="水井测压"
              align="center"
            >
            </el-table-column>
            <el-table-column prop="disi.inventory" label="库存" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dsizyqS103" label="树103" align="center">
            <el-table-column prop="dsizyqS103Wj" label="微机" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dsizyqS12" label="树12" align="center">
            <el-table-column prop="dsizyqS12Wj" label="微机" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dsizyqX30" label="徐30" align="center">
            <el-table-column prop="dsizyqX30Wj" label="微机" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dsizyqX6" label="徐6" align="center">
            <el-table-column
              prop="dsizyqX6Wj"
              label="微机"
              width="40"
              align="center"
            >
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dsizyqYel" label="榆二联" align="center">
            <el-table-column
              prop="dsizyqYelEljy"
              label="二联接油"
              align="center"
            >
            </el-table-column>
            <el-table-column prop="dsizyqYelSc" label="输差" align="center">
            </el-table-column>
            <el-table-column prop="dsizyqYelDt" label="电脱" align="center">
            </el-table-column>
            <el-table-column prop="dsizyqYelWs" label="污水" align="center">
            </el-table-column>
          </el-table-column>
          <el-table-column prop="dsizyqMdjyl" label="末端接油量" align="center">
            <el-table-column
              prop="dsizyqMdjylSyz"
              label="试验站"
              align="center"
            >
            </el-table-column>
            <el-table-column prop="dsizyqMdjylD16" label="东16" align="center">
            </el-table-column>
            <el-table-column prop="dsizyqMdjylS8" label="树8" align="center">
            </el-table-column>
            <el-table-column
              prop="dsizyqMdjylS127"
              label="树127"
              align="center"
            >
            </el-table-column>
          </el-table-column>
        </el-table-column>
        <el-table-column prop="zz" label="肇州" align="center">
          <el-table-column prop="zy" label="肇州一工区" align="center">
            <el-table-column
              prop="zhaozhouyi.planOilPro"
              label="计划产油"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouyi.realOilPro"
              label="实际产油"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouyi.planWaterInj"
              label="计划注水"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouyi.realWaterInj"
              label="日注水量"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouyi.workBacklog"
              label="作业积压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouyi.workBacklogPending"
              label="待作业积压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouyi.oilWellPressure"
              label="油井测压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouyi.waterWellPressure"
              label="水井测压"
              align="center"
            >
            </el-table-column>
          </el-table-column>
          <el-table-column prop="ze" label="肇州二工区" align="center">
            <el-table-column
              prop="zhaozhouer.planOilPro"
              label="计划产油"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouer.realOilPro"
              label="实际产油"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouer.planWaterInj"
              label="计划注水"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouer.realWaterInj"
              label="日注水量"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouer.workBacklog"
              label="作业积压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouer.workBacklogPending"
              label="待作业积压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouer.oilWellPressure"
              label="油井测压"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="zhaozhouer.waterWellPressure"
              label="水井测压"
              align="center"
            >
            </el-table-column>
          </el-table-column>
        </el-table-column>
        <el-table-column prop="tlzyq" label="提捞作业区" align="center">
          <el-table-column prop="tlzyqZyq" label="作业区" align="center">
            <el-table-column
              prop="tlzyqZyqJhly"
              label="计划捞油"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="tlzyqZyqSjly"
              label="实际捞油"
              align="center"
            >
            </el-table-column>
          </el-table-column>
          <el-table-column prop="tlzyqXyd" label="卸油点" align="center">
            <el-table-column prop="tlzyqXydD16" label="东16" align="center">
            </el-table-column>
            <el-table-column prop="tlzyqXydS18" label="树18" align="center">
            </el-table-column>
            <el-table-column
              prop="tlzyqXydLyhj"
              label="捞油合计"
              align="center"
            >
            </el-table-column>
            <el-table-column
              prop="tlzyqXydXjly"
              label="新井捞油"
              align="center"
            >
            </el-table-column>
            <el-table-column prop="tlzyqXydLdy" label="落地油" align="center">
            </el-table-column>
          </el-table-column>
        </el-table-column>
        <el-table-column prop="bz" label="备注" width="100" align="center">
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import ydscsjtjbApi from "@/api/ydscsjtjb";

export default {
  data() {
    return {
      show: false, //隐藏序列
      pageNo: 1, //当前页码
      pageSize: 5, //每页显示数量
      total: 0, //总数量
      currentPage: 1, //当前页码
      //时间快捷选择
      pickerOptions: {
        // disabledDate(time) {
        //   return time.getTime() > Date.now();
        // },
        shortcuts: [
          {
            text: "今天",
            onClick(picker) {
              picker.$emit("pick", new Date());
            },
          },
          {
            text: "昨天",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", date);
            },
          },
          {
            text: "一周前",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", date);
            },
          },
        ],
      },
      searchDate: null,
      //  表头数据
      tableHead: [
        { val: "指标11111", item: "target1" },
        { val: "指标2", item: "target2" },
        { val: "指标3", item: "target3" },
        { val: "指标4", item: "target4" },
        { val: "指标5", item: "target5" },
      ],
      // 表格数据
      tableData: [],
      approveStatus: "",
      ydscsjtjbForm: {},
      // // table数据总条数
      // tableTotal: 30,
      // // 分页数
      // currentSize: 10,
      // //当前页
      // currentPage: 4
    };
  },
  mounted() {
    this.search(2023,8);
  },
  methods: {
    /**
     * 查询列表
     */
    async search(year,month) {
      let res = await ydscsjtjbApi.getDataList(
        year,
        month
      );
      //判断是否成功
      if (res.success) {
        console.log(res.data);
        //赋值
        this.tableData = res.data;
      }
      console.log(this.tableData)
    },
    //条件查询
    formSearch() {
      var year=parseInt(arr[0])
      var month=parseInt(arr[1])
      this.search(year,month)
    },
    //下载
    download() {
      import("@/vendor/Export2Excel").then((excel) => {
        const multiHeader = [
          [
            "月度生产数据统计表",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //公司18行
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //第一作业区12行
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //第二作业区13行
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //第三作业区13行
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //第四作业区21行
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //提捞作业区7行
            "",
          ], //第一行
          [
            "日期",
            "公司",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //公司18行
            "第一作业区",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //第一作业区12行
            "第二作业区",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //第二作业区13行
            "第三作业区",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //第三作业区13行
            "第四作业区",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //第四作业区21行
            "肇州",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "提捞作业区",
            "",
            "",
            "",
            "",
            "",
            "", //提捞作业区7行
            "备注",
          ], //第一行
          [
            "",
            "产油",
            "",
            "",
            "",
            "",
            "", //产油6行
            "拉油",
            "",
            "",
            "库存",
            "",
            "",
            "注水",
            "",
            "积压",
            "",
            "测压",
            "",
            "作业区",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //9
            "树322",
            "东12",
            "尚12",
            "作业区",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //9
            "东16",
            "",
            "东14",
            "",
            "作业区",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //9
            "树2",
            "101队",
            "",
            "树16",
            "作业区",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "", //9
            "树103",
            "树12",
            "徐3",
            "徐6",
            "榆二联",
            "",
            "",
            "", //4
            "末端接油量",
            "",
            "",
            "", //4
            "肇州一工区",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "肇州二工区",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "作业区",
            "",
            "卸油点",
            "",
            "",
            "",
            "",
            "",
          ], //第二行
        ]; // 前三行的表头数据，二维数组，不够的用空白补全
        const header = [
          "",
          "井口产油",
          "末端微机",
          "计划产油",
          "核实产油",
          "公司外输",
          "二联外输",
          "拉油",
          "提捞",
          "落地油",
          "公司库存",
          "二联差值",
          "二联库存",
          "计划水量",
          "实际水量",
          "作业",
          "待作业",
          "油井",
          "水井",
          "计划产油",
          "实际产油",
          "计划注水",
          "日注水量",
          "作业积压",
          "待作业积压",
          "油井测压",
          "水井测压",
          "库存",
          "微机",
          "微机",
          "微机",
          "计划产油",
          "实际产油",
          "计划注水",
          "日注水量",
          "作业积压",
          "待作业积压",
          "油井测压",
          "水井测压",
          "库存",
          "微机",
          "污水处理",
          "382微机",
          "东14微机",
          "计划产油",
          "实际产油",
          "计划注水",
          "日注水量",
          "作业积压",
          "待作业积压",
          "油井测压",
          "水井测压",
          "库存",
          "产油量",
          "产油量",
          "C02注入量",
          "微机",
          "计划产油",
          "实际产油",
          "计划注水",
          "日注水量",
          "作业积压",
          "待作业积压",
          "油井测压",
          "水井测压",
          "库存",
          "微机",
          "微机",
          "微机",
          "微机",
          "二联接油",
          "输差",
          "电脱",
          "污水",
          "实验站",
          "东16",
          "树8",
          "树127",
          "计划产油",
          "实际产油",
          "计划注水",
          "日注水量",
          "作业积压",
          "待作业积压",
          "油井测压",
          "水井测压",
          "计划产油",
          "实际产油",
          "计划注水",
          "日注水量",
          "作业积压",
          "待作业积压",
          "油井测压",
          "水井测压",
          "计划捞油",
          "实际捞油",
          "东16",
          "树8",
          "捞油合计",
          "新井捞油",
          "落地油",
          "",
        ]; // 最后一行的表头数据
        const filterVal = [
          "rq",
          "gsCsJkcy",
          "gsCsMdwj",
          "gsCsJhcy",
          "gsCsHscy",
          "gsCsGsws",
          "gsCsElws",
          "gsLyLy",
          "gsLyTl",
          "gsLyLdy",
          "gsKcGskc",
          "gsKcElcz",
          "gsKcElkc",
          "gsZsJhzs",
          "gsZsSjsl",
          "gsJyZy",
          "gsJyDzy",
          "gsCyYj",
          "gsCySj",
          "dyzyqZyqJhcy",
          "dyzyqZyqSjcy",
          "dyzyqZyqJhzs",
          "dyzyqZyqRzsl",
          "dyzyqZyqZyjy",
          "dyzyqZyqDzyjy",
          "dyzyqZyqYjcy",
          "dyzyqZyqShjcy",
          "dyzyqZyqKc",
          "dyzyqS322Wj",
          "dyzyqD12Wj",
          "dyzyqS12Wj",
          "dezyqZyqJhcy",
          "dezyqZyqSjcy",
          "dezyqZyqJhzs",
          "dezyqZyqRzsl",
          "dezyqZyqZyjy",
          "dezyqZyqDzyjy",
          "dezyqZyqYjcy",
          "dezyqZyqShjcy",
          "dezyqZyqKc",
          "dezyqD16Wj",
          "dezyqD16Wscl",
          "dezyqD14382wj",
          "deyzyqD14D14wj",
          "dszyqZyqJhcy",
          "dszyqZyqSjcy",
          "dszyqZyqJhzs",
          "dszyqZyqRzsl",
          "dszyqZyqZyjy",
          "dszyqZyqDzyjy",
          "dszyqZyqYjcy",
          "dszyqZyqShjcy",
          "dszyqZyqKc",
          "dszyqS2Cyl",
          "dszyq101dCyl",
          "dszyq101dZrl",
          "dszyqS16Wj",
          "dsizyqZyqJhcy",
          "dsizyqZyqSjcy",
          "dsizyqZyqJhzs",
          "dsizyqZyqRzsl",
          "dsizyqZyqZyjy",
          "dsizyqZyqDzyjy",
          "dsizyqZyqYjcy",
          "dsizyqZyqShjcy",
          "dsizyqZyqKc",
          "dsizyqS103Wj",
          "dsizyqS12Wj",
          "dsizyqX30Wj",
          "dsizyqX6Wj",
          "dsizyqYelEljy",
          "dsizyqYelSc",
          "dsizyqYelDt",
          "dsizyqYelWs",
          "dsizyqMdjylSyz",
          "dsizyqMdjylD16",
          "dsizyqMdjylS8",
          "dsizyqMdjylS127",
          "zzZyJhcy",
          "zzZySjcy",
          "zzZyJhzs",
          "zzZyRzsl",
          "zzZyZyjy",
          "zzZyDzyjy",
          "zzZyYjcy",
          "zzZyShjcy",
          "zzZeJhcy",
          "zzZeSjcy",
          "zzZeJhzs",
          "zzZeRzsl",
          "zzZeZyjy",
          "zzZeDzyjy",
          "zzZeYjcy",
          "zzZeShjcy",
          "tlzyqZyqJhly",
          "tlzyqZyqSjly",
          "tlzyqXydD16",
          "tlzyqXydS18",
          "tlzyqXydLyhj",
          "tlzyqXydXjly",
          "tlzyqXydLdy",
          "bz",
        ];
        const list = this.tableData;
        const data = this.formatJson(filterVal, list);
        const merges = [
          "A1:CX1",
          "A2:A4",
          "B2:S2",
          "T2:AE2",
          "AF2:AR2",
          "AS2:BE2",
          "BF2:BZ2",
          "CA2:CP2",
          "CQ2:CW2",
          "CX2:CX4",
          "B3:G3",
          "H3:J3",
          "K3:M3",
          "N3:O3",
          "P3:Q3",
          "R3:S3",
          "T3:AB3",
          "AF3:AN3",
          "AO3:AP3",
          "AQ3:AR3",
          "AS3:BA3",
          "BC3:BD3",
          "BF3:BN3",
          "BS3:BV3",
          "BW3:BZ3",
          "CA3:CH3",
          "CA3:CP3",
          "CQ3:CR3",
          "CS3:CW3",
        ]; // 合并单元格的数据
        excel.export_json_to_excel({
          multiHeader,
          header,
          filename: "月度生产数据统计表",
          autoWidth: true,
          merges,
          data,
        });
      });
    },
    formatJson(filterVal, jsonData) {
      return jsonData.map((v) =>
        filterVal.map((j) => {
          return v[j];
        })
      );
    },
    /*** 当每页数量发生变化时触发该事件 */
    handleSizeChange(size) {
      console.log(size);
      this.pageSize = size;
      //将每页显示的数量交给成员变量
      this.search(this.pageNo, size);
    },
    /*** 当页码发生变化时触发该事件 */
    handleCurrentChange(page) {
      console.log(page);
      this.pageNo = page;
      //调用查询方法
      this.search(page, this.pageSize);
    },
    // 序号计算
    indexMethod(index) {
      // index默认在0开始，这里+1
      return index + 1 + (this.pageNo - 1) * this.pageSize;
    },
  },
};
</script>


<style lang="scss" scoped>
// 标题
.mytitle {
  font-size: larger;
  padding-left: 45%;
  margin-bottom: 16px;
  float: left;
}

//按钮组
.myTime {
  float: right;
}

//格子的样式
.bg-white {
  background: #ffffff;
}

.grid-content {
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.calendar ::v-deep .el-button-group::before {
  display: none;
}

.calendar ::v-deep .el-button-group::after {
  display: none;
}

// 分割线样式
.el-divider--horizontal {
  display: block;
  height: 2px;
  width: 100%;
  margin: 24px 0;
}

// 表单各项的样式
.el-form-item {
  margin: 15px 10px 15px 10px;
}
</style>
